<%@page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<script type="text/javascript">
$(function(){
 	var domainModule = $('#ddl2bean_domainModule').val() ? $('#ddl2bean_domainModule').val() : $('#ddl2bean_domainModule').attr('placeholder');
 	$('#ddl2bean_domainModule2').val(domainModule);
 	$('#ddl2bean_ddl').val($('#ddl4bean').val());
});
</script>

 <h2>步骤2：配置字段</h2>
<ul>
<li>如果设置日志掩码，将对象输出日志时会自动替换成掩码字符</li>
<li>如果设置大小写，通过<strong>com.joinway.framework.data.jdbc.repository.TableRepository</strong>保存对象到数据库时会做大小写转换</li>
<!-- <li>自增主键不在设置范围内</li> -->
</ul>
<form id="ddl2bean_form">
 <table class="tstyle tborder">
	<tr>
		<th class="tborder center">序号</th>
		<th class="tborder center">列名</th>
		<th class="tborder center">日期保存</th>
		<th class="tborder center">日志掩码</th>
 		<th class="tborder center">保存大小写转换</th>
	</tr>
<c:forEach items="${columns}" var="column" varStatus="status">	
	<tr>
		<th class="tborder center">${status.index + 1}</th>
		<th class="tborder">${column.name}</th>
		<td class="tborder center">
			<c:if test="${column.type == 'Date'}">
			<select name="${column.name}.date">
				<option value="">无</option>
				<option value="@LastUpdated">@LastUpdated</option>
				<option value="@DateCreated">@DateCreated</option>
			</select>
			</c:if>
		</td>
		<td class="tborder center">
 			<input type="radio" name="${column.name}.mask" value="" checked="checked"/>无
 			<input type="radio" name="${column.name}.mask" value="@LogMask"/>有
 			<input type="radio" name="${column.name}.mask" value="@LogIgnore"/>忽略			
		</td>
		<td class="tborder center">
 			<input type="radio" name="${column.name}.format" value="" checked="checked"/>无
 			<input type="radio" name="${column.name}.format" value="@PersistFormat(PersistCase.Upper)"/>大写
 			<input type="radio" name="${column.name}.format" value="@PersistFormat(PersistCase.Lower)"/>小写		
		</td>
	</tr>
</c:forEach>
</table>
<input id="ddl2bean_domainModule2" name="domainModule" type="hidden">
<input id="ddl2bean_ddl" name="ddl" type="hidden">
</form>
